package pack;

public class Client extends Thread {
	int id;
	Caisse ca;
	public Client(int id, Caisse ca) {
		super();
		this.id = id;
		this.ca = ca;
	}
	
	public void run(){
		for(int turn=0; turn<100; turn++){
			try {
				sleep((int)(Math.random()*5*1000));
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			System.out.println("Client "+id+" fait sa commande");
			ca.commandeBigMacFrites();
			ca.prendCommande();
			System.out.println("Client "+id+" a recu sa commande");
			
		}
	}
}
